package com.authine.cloudpivot.ext.service;

import com.alibaba.cola.dto.SingleResponse;
import com.authine.cloudpivot.ext.dto.OrderCustomerGoodsDto;
import com.authine.cloudpivot.ext.dto.finance.TradeErpPoUpdate;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 对接财务接口方法
 */
public interface DockFinanceService {

    /**
     * 调用财务生成交易记录
     * @param orderCustomerIds
     * @return
     */
    SingleResponse createTrade(Collection<String> orderCustomerIds);

    /**
     * 回写交易对应的ERP_PO号
     *
     * @param tradeErpPoUpdates
     */
    SingleResponse writeBackErpPo(List<TradeErpPoUpdate> tradeErpPoUpdates);

    /**
     * 回写订单对应交易的订单商品状态
     */
    SingleResponse writeBackTradesOrder(List<Map<String, Object>> writeBackParams);

    /**
     * 回写对应交易的金税编码
     * @param dto
     */
    SingleResponse writeBackTradesOrder(OrderCustomerGoodsDto dto);

    /**
     * 创建退货账单
     * @param bulkRefundVOs
     */
    SingleResponse refundBill(List<Map<String, Object>> bulkRefundVOs);

    /**
     * 确认收货生成商品账单
     * @param orderGoods 数量合并到商品里
     */
    SingleResponse createBill(List<Map<String, Object>> orderGoods);
}
